<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.apache.shiro.authc.IncorrectCredentialsException"%>
<%@page import="org.apache.shiro.authc.UnknownAccountException"%>
<%@page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@page import="org.apache.shiro.authc.AuthenticationException"%>
<%@ include file="/WEB-INF/views/jsp/pages/include/global.jsp" %>
<%
	String expMsg="";
	Object authExp = request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
	if(authExp!=null){
		if(authExp.equals("org.apache.shiro.authc.UnknownAccountException")){
			expMsg="账户不存在！";
		}else if(authExp.equals("org.apache.shiro.authc.IncorrectCredentialsException")){
			expMsg="账户密码错误！";
		}else if(authExp.equals("org.apache.shiro.authc.DisabledAccountException")){
			expMsg="账户不可用！";
		}else if(authExp.equals("com.breeze.bms.shiro.VerifyCodeMatchException")){
			expMsg="验证码不正确！";
		}else{
			expMsg="登录异常 :"+authExp ;
		}
	}
%>

	<c:set scope="request" var="expMsg" value="<%=expMsg%>" />
		<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
		<html>

		<head>
			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
			<meta http-equiv="X-UA-Compatible" content="IE=edge">
			<meta content="width=device-width, initial-scale=1" name="viewport" />
			<title>铅笔岛支付渠道系统登录</title>


			<!-- BEGIN GLOBAL MANDATORY STYLES -->
			<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"
			/>
			<link href="${self.path.metronic}/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"
			/>
			<link href="${self.path.metronic}/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"
			/>
			<link href="${self.path.metronic}/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"
			/>
			<link href="${self.path.metronic}/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"
			/>
			<link href="${self.path.metronic}/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"
			/>
			<!-- END GLOBAL MANDATORY STYLES -->
			<!-- BEGIN PAGE LEVEL PLUGINS -->
			<link href="${self.path.metronic}/assets/global/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
			<link href="${self.path.metronic}/assets/global/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css"
			/>
			<!-- END PAGE LEVEL PLUGINS -->
			<!-- BEGIN THEME GLOBAL STYLES -->
			<link href="${self.path.metronic}/assets/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css"
			/>
			<link href="${self.path.metronic}/assets/global/css/plugins.min.css" rel="stylesheet" type="text/css" />

			<link rel="shortcut icon" href="favicon.ico" />

			<link rel="stylesheet" type="text/css" href="${self.path.resources}/console/css/login.css" />
			
			<script>
				var context = '<%= request.getContextPath()%>';
			</script>
		</head>

		<body class=" login">
			<!-- BEGIN LOGO -->
			<div class="logo">
				<a href="http://www.baidu.com">
					<img src="${self.path.resources}/console/image/logo-big.png" alt="" /> </a>
			</div>
			<!-- END LOGO -->
			<!-- BEGIN LOGIN -->
			<div class="content">
				<!-- BEGIN LOGIN FORM -->
				<form class="login-form" action="" method="post">
					<h3 class="form-title">登录你的账号</h3>
					<c:if test="${expMsg!=''}">
						<div class="alert alert-danger">
							<button class="close" data-close="alert"></button>
							<span> ${expMsg}</span>
						</div>
					</c:if>
					<c:if test="${expMsg==''}">
					<div class="alert alert-danger display-hide">
						<button class="close" data-close="alert"></button>
						<span> 请输入用户名或密码 </span>
					</div>
					</c:if>
					<div class="form-group">
						<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
						<label class="control-label visible-ie8 visible-ie9">用户名</label>
						<div class="input-icon">
							<i class="fa fa-user"></i>
							<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="用户名" name="username" />							</div>
					</div>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">密码</label>
						<div class="input-icon">
							<i class="fa fa-lock"></i>
							<input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="密码" name="password"
							/> </div>
					</div>
					<div class="form-actions">
						<label class="checkbox">
                        				<input type="checkbox" name="remember" value="1" /> 记住我 </label>
						<button type="submit" class="btn green pull-right"> 登录 </button>
					</div>
					<!--<div class="login-options">
						<h4>Or login with</h4>
						<ul class="social-icons">
							<li>
								<a class="facebook" data-original-title="facebook" href="javascript:;"> </a>
							</li>
							<li>
								<a class="twitter" data-original-title="Twitter" href="javascript:;"> </a>
							</li>
							<li>
								<a class="googleplus" data-original-title="Goole Plus" href="javascript:;"> </a>
							</li>
							<li>
								<a class="linkedin" data-original-title="Linkedin" href="javascript:;"> </a>
							</li>
						</ul>
					</div>-->
					<!--<div class="forget-password">
						<h4>忘记密码?</h4>
						<p> 别担心, 点击
							<a href="javascript:;" id="forget-password"> 这里 </a> 重置你的密码. </p>
					</div>
					<div class="create-account">
						<p> 还没账号 ?&nbsp;
							<a href="javascript:;" id="register-btn"> 注册 </a>
						</p>
					</div>-->
				</form>
				<!-- END LOGIN FORM -->
				<!-- BEGIN FORGOT PASSWORD FORM -->
				<form class="forget-form" action="index.html" method="post">
					<h3>Forget Password ?</h3>
					<p> Enter your e-mail address below to reset your password. </p>
					<div class="form-group">
						<div class="input-icon">
							<i class="fa fa-envelope"></i>
							<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Email" name="email" />							</div>
					</div>
					<div class="form-actions">
						<button type="button" id="back-btn" class="btn grey-salsa btn-outline"> Back </button>
						<button type="submit" class="btn green pull-right"> Submit </button>
					</div>
				</form>
				<!-- END FORGOT PASSWORD FORM -->
				<!-- BEGIN REGISTRATION FORM -->
				<form class="register-form" action="index.html" method="post">
					<h3>Sign Up</h3>
					<p> Enter your personal details below: </p>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">Full Name</label>
						<div class="input-icon">
							<i class="fa fa-font"></i>
							<input class="form-control placeholder-no-fix" type="text" placeholder="Full Name" name="fullname" /> </div>
					</div>
					<div class="form-group">
						<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
						<label class="control-label visible-ie8 visible-ie9">Email</label>
						<div class="input-icon">
							<i class="fa fa-envelope"></i>
							<input class="form-control placeholder-no-fix" type="text" placeholder="Email" name="email" /> </div>
					</div>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">Address</label>
						<div class="input-icon">
							<i class="fa fa-check"></i>
							<input class="form-control placeholder-no-fix" type="text" placeholder="Address" name="address" /> </div>
					</div>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">City/Town</label>
						<div class="input-icon">
							<i class="fa fa-location-arrow"></i>
							<input class="form-control placeholder-no-fix" type="text" placeholder="City/Town" name="city" /> </div>
					</div>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">Country</label>
						<select name="country" id="country_list" class="select2 form-control">
											<option value=""></option>
											<option value="AF">Afghanistan</option>	
										</select>
					</div>
					<p> Enter your account details below: </p>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">Username</label>
						<div class="input-icon">
							<i class="fa fa-user"></i>
							<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Username" name="username" />							</div>
					</div>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">Password</label>
						<div class="input-icon">
							<i class="fa fa-lock"></i>
							<input class="form-control placeholder-no-fix" type="password" autocomplete="off" id="register_password" placeholder="Password"
							 name="password" /> </div>
					</div>
					<div class="form-group">
						<label class="control-label visible-ie8 visible-ie9">Re-type Your Password</label>
						<div class="controls">
							<div class="input-icon">
								<i class="fa fa-check"></i>
								<input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="Re-type Your Password" name="rpassword"
								/> </div>
						</div>
					</div>
					<div class="form-group">
						<label>
                        <input type="checkbox" name="tnc" /> I agree to the
                        <a href="javascript:;"> Terms of Service </a> and
                        <a href="javascript:;"> Privacy Policy </a>
                    </label>
						<div id="register_tnc_error"> </div>
					</div>
					<div class="form-actions">
						<button id="register-back-btn" type="button" class="btn grey-salsa btn-outline"> Back </button>
						<button type="submit" id="register-submit-btn" class="btn green pull-right"> Sign Up </button>
					</div>
				</form>
				<!-- END REGISTRATION FORM -->
			</div>
			<!-- END LOGIN -->
			<!--[if lt IE 9]>
							<script src="../assets/global/plugins/respond.min.js"></script>
							<script src="../assets/global/plugins/excanvas.min.js"></script> 
							<![endif]-->
			<!-- BEGIN CORE PLUGINS -->
			<script src="${self.path.metronic}/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/js.cookie.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
			<!-- END CORE PLUGINS -->
			<!-- BEGIN PAGE LEVEL PLUGINS -->
			<script src="${self.path.metronic}/assets/global/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/jquery-validation/js/additional-methods.min.js" type="text/javascript"></script>
			<script src="${self.path.metronic}/assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
			<!-- END PAGE LEVEL PLUGINS -->
			<!-- BEGIN THEME GLOBAL SCRIPTS -->
			<script src="${self.path.metronic}/assets/global/scripts/app.min.js" type="text/javascript"></script>
			<!-- END THEME GLOBAL SCRIPTS -->
			<!-- BEGIN PAGE LEVEL SCRIPTS -->
			<script src="${self.path.resources}/console/js/login.js" type="text/javascript"></script>
			<!-- END PAGE LEVEL SCRIPTS -->
			<!-- BEGIN THEME LAYOUT SCRIPTS -->
			<!-- END THEME LAYOUT SCRIPTS -->
		</body>

		</html>